home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 8
/
Amoszine 8 (Disk 2 of 3).adf
/
Powerbobs.lha
/
powerbobsv1.0
/
examples
/
Div_Array_vs_Plsr_Array.asc
< prev
next >
Wrap
Text File
|
1995-06-30
|
543b
|
32 lines
'This example shows the use of the Plsr command.
'
'Plsr allows VERY FAST Div by 2^N. (2,4,8,16,32...)
'
'In this example we use, 2^4=16.
'
'Plsr,Plsl,Pasr & Pasl all follow the same format.
'
Dim X(1000)
Input "Give range, max 1000 : ";_MAX
'
T=Timer
For I=1 To 100
For K=0 To _MAX
X(K)=X(K)/16
Next
Next
'
'Display the ellapsed time in Vbl's
'
Print "Normal code:";Timer-T
'
ADRESS_X=Varptr(X(0))
T=Timer
For I=1 To 100
Plsr ADRESS_X,4,0 To _MAX
Next
'
'Display the ellapsed time in Vbl's
'
Print "Powerbobs :";Timer-T